from apps.CeleryTimedTask.views import *
from rest_framework import routers
from django.conf.urls import url

# 创建路由对象
# router = routers.SimpleRouter()
router = routers.DefaultRouter()
# 注册路由
# 1.路由前缀 2.视图集
router.register(r'CeleryTimedTask/crontab_schedule', CrontabViewSet, basename='CeleryTimedTask')
router.register(r'CeleryTimedTask/timedtask', CeleryTimeTask, basename='CeleryTimedTask')

urlpatterns = [
    url(r'CeleryTimedTask/celer/tasks/registered/', TasksAPIViews.as_view())
]
urlpatterns += router.urls
